import request from '@/axios'

/**
 * 登录
 * @param {*} data
 * @returns
 */
const login = data => {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

/**
 * 获取用户信息
 * @returns
 */
const getUserInfo = () => {
  return request({
    url: '/sys/profile',
    method: 'get'
  })
}

/**
 * 查询表格数据
 * @param data
 */
const tableQuery = (url, data) => {
  return request({
    url: url,
    method: 'get',
    params: data
  })
}

export {
  login,
  getUserInfo,
  tableQuery
}
